<template>
      <div class="default-table-detail-container">
            <BaseTableInfo v-model="baseTableInfoModel" />
      </div>
</template>

<script lang="ts" setup>

import SupplierInfoBaseApi from '/@/api/webPath/SupplierInfoBaseApi.ts';

const props = defineProps({
      modelValue: {

      }
})
const route = useRouter()

const baseTableInfoModel = ref({
      columnCount: 3,
      autoFit: false,
      columnWidth: '300px',
      labelWidth: '100px',
      title: '基本信息',
      modelData: {},
      itemList: [
            {
                  title: '',
                  items: [   //渲染样式区域  通过key ===model 中的值
                        {
                              label: "名称",
                              field: "supplierName",
                        },
                        {
                              label: "联系人",
                              field: "supplinerContacts",
                        },
                        {
                              label: "联系电话",
                              field: "supplinerPhone",
                        },
                        {
                              label: "省id",
                              field: "supplierProvinceId",
                        },
                        {
                              label: "市id",
                              field: "supplierCityId",
                        },
                        {
                              label: "区id",
                              field: "supplierCareaId",
                        },
                        {
                              label: "省",
                              field: "supplierProvinceName",
                        },
                        {
                              label: "市",
                              field: "supplierCityName",
                        },
                        {
                              label: "区",
                              field: "supplierCareaName",
                        },
                        {
                              label: "地址",
                              field: "supplierAdd",
                        },
                        {
                              label: "统一社会信用代码",
                              field: "creditCode",
                        },
                        {
                              label: "统一社会信用代码签发日期",
                              field: "creditSignDate",
                        },
                        {
                              label: "统一社会信用代码许可证类型",
                              field: "creditType",
                        },
                        {
                              label: "统一社会信用代码许可证类型名称",
                              field: "creditTypeName",
                        },
                        {
                              label: "经营许可证编码",
                              field: "businessCode",
                        },
                        {
                              label: "经营许可证签发日期",
                              field: "businessSignDate",
                        },
                        {
                              label: "经营许可有效期",
                              field: "businessEffectiveDate",
                        },
                        {
                              label: "经营许可类型",
                              field: "businessType",
                        },
                        {
                              label: "经营许可类型名称",
                              field: "businessTypeName",
                        },
                        {
                              label: "生产许可证编码",
                              field: "produceCode",
                        },
                        {
                              label: "生产许可证签发日期",
                              field: "produceSignDate",
                        },
                        {
                              label: "生产许可有效期",
                              field: "produceEffectiveDate",
                        },
                        {
                              label: "生产许可类型",
                              field: "produceType",
                        },
                        {
                              label: "生产许可类型名称",
                              field: "produceTypeName",
                        },
                        {
                              label: "生产许可产品类别",
                              field: "produceClass",
                        },
                        {
                              label: "生产许可类别编码",
                              field: "produceClassCode",
                        },
                        {
                              label: "生产许可类别名称",
                              field: "produceClassName",
                        },
                        {
                              label: "生产许可品种明细",
                              field: "produceClassDetail",
                        },
                        {
                              label: "创建人",
                              field: "creator",
                        },
                        {
                              label: "修改人",
                              field: "reviser",
                        },
                        // {
                        //       label: "排序",
                        //       field: "sort",
                        // },
                        {
                              label: "创建时间",
                              field: "create_time",
                        },
                        {
                              label: "更新时间",
                              field: "update_time",
                        },
                  ]
            }
      ],
      buttons: [   //标题操作区域
            // {
            //   name: "更多",
            //  buttonClass: 'danger',
            // width: 100,
            // click: (any: object) => {   //暴露的方法钩子
            // $baseMessage("这里执行业务", 'success', 'vab-hey-message-success');
            //},
            //},


      ]
})

onMounted(async () => {
      //初始化数据model
      const { data } = await SupplierInfoBaseApi.getDetail({
            supplierInfoBaseId: props.modelValue.query.supplierInfoBaseId   //从路由中获取参数
      })
      baseTableInfoModel.value.modelData = data;





})
</script>

<style lang="scss" scoped>
.default-table-detail-container {
      :deep() {
            .el-form--inline {
                  .el-form-item {
                        margin-right: 10px;
                  }
            }

            .el-descriptions__label {
                  min-width: 80px !important;
                  text-align: right;
            }
      }
}
</style>
